VERSION 5.00
Begin VB.UserControl txtNumero8 
   BackColor       =   &H80000013&
   ClientHeight    =   345
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1050
   ScaleHeight     =   345
   ScaleWidth      =   1050
   Begin VB.TextBox Text1 
      Alignment       =   1  'Right Justify
      Height          =   285
      Left            =   0
      MaxLength       =   8
      TabIndex        =   0
      Top             =   0
      Width           =   975
   End
End
Attribute VB_Name = "txtNumero8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Event Validado()

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyReturn Then
    'SendKeys "{TAB}"
End If

End Sub

Private Sub text1_KeyPress(KeyAscii As Integer)
If IsNumeric(Chr(KeyAscii)) = False And KeyAscii <> 8 Then
' el 8 es de backspace y el 46 es el punto
KeyAscii = 0
End If
End Sub

Private Sub Text1_LostFocus()
RaiseEvent Validado
End Sub

Private Sub Text1_Validate(Cancel As Boolean)
RaiseEvent Validado
End Sub

Public Function text() As String
text = Text1.text
End Function

Public Function settext(texto As String)
Text1.text = texto
End Function
Public Sub habilitar(b As Boolean)
Text1.Enabled = b
End Sub

Public Sub focus()
    Text1.SetFocus
End Sub
